class Card {
    double balance;//余额
    public boolean charge(double amount) {
        return false;
    }
}
class GoldCard extends Card {
    @Override
    public boolean charge(double amount) {
        if (amount >= 5000) {
            balance += amount;
            return true;
        }
        return false;
    }
}
public class work04 {
    public static void main(String[] args) {
        GoldCard g = new GoldCard();
        System.out.println(g.charge(6000));
    }
}
